﻿@using SelfMadeMillionaire.Core
@using SelfMadeMillionaire.Core.Enums
@using SelfMadeMillionaire.Web.Infrastructure
@using SelfMadeMillionaire.Web.Infrastructure.Formatters
@using SelfMadeMillionaire.Web.Infrastructure.ViewModels.Admin
@using PagedList.Mvc
@model DailyNewUserReportViewModel

<div class="table-responsive">
		<table class="table table-bordered tablesorter">
			<thead>
				<tr>
					<th><a href="#">Date</a></th>
					<th><a href="#">Free </a></th>
                    <th><a href="#">Silver </a></th>
                    <th><a href="#">Gold </a></th>
                    <th><a href="#">Platinum </a></th>
                    <th><a href="#">Total </a></th>
				</tr>
			</thead>
			<tbody>
                    @foreach(DailyNewUserReportItemModel item in Model.Items.OrderByDescending(i => i.Date))
                    {
					<tr>
						<td>@item.Date.ToString("MM/dd/yyyy")</td>
						<td style="text-align:right">@item.CountFree.ToString()</td>
                        <td style="text-align:right">@item.CountSilver.ToString()</td>
                        <td style="text-align:right">@item.CountGold.ToString()</td>
                        <td style="text-align:right">@item.CountPlatinum.ToString()</td>
                        <td style="text-align:right">@item.CountTotal.ToString()</td>
					</tr>
                    }
                    <tr>
						<td>Total</td>
						<td></td>
                        <td></td>
                        <td></td>
                        <td></td>
                        <td style="text-align:right">@Model.SumTotal.ToString()</td>
					</tr>
			</tbody>
		</table>
</div>

<script type="text/javascript">
	$(function () {
	    $("#report-list table").tablesorter({});
	});
</script>
